<template>
    <div class="no-template-tip">
        <div class="tip-box">
            <img src="@/assets/big-delete-icon.svg" alt="" />
            <div class="tip-text">{{ getTip }}</div>
        </div>
    </div>
</template>

<script setup lang="ts">
import { computed, ref } from 'vue';
import { useRoute } from 'vue-router';
import { useI18n } from 'vue-i18n';
const { t } = useI18n();

const route = useRoute();

const props = defineProps({
    tip: String
})

//  1  删除提示  2  无权限提示
const tipType = ref<string>('1');

const getTip = computed(() => {
    if (tipType.value === '2') {
        return t('NoviewingPermission');
    }
    return props.tip;
});

const created = () => {
    tipType.value = (route.query.tipType as string) || '1';
};
created();
</script>

<style scoped lang="scss">
.no-template-tip {
    width: 100%;
    height: 100%;
    position: relative;

    .tip-box {
        position: absolute;
        top: 106px;
        left: 50%;
        text-align: center;
        transform: translateX(-50%);
    }

    .tip-text {
        font-size: 16px;
        font-weight: bold;
    }

    img {
        margin-bottom: 30px;
    }
}
</style>
